<!DOCTYPE html>
{% load url from future %}
{% load icons bob i18n staticfiles %}
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Ralph | {% block title %}{% block titlesection %}{{ active_menu.module.label }}{% block titlesubsection %}{% endblock %} - {{ active_submodule|title }}{% endblock %}{% endblock %}</title>
        {% block styles %}
            <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
            <link href="{% static 'bootstrap/css/bootstrap-responsive.min.css' %}" rel="stylesheet">
            <link rel="stylesheet" href="{% static 'bootstrap/css/bs3fake.css' %}">
            <link rel="stylesheet" href="{% static 'fugue-icons.css' %}">
            <link rel="stylesheet" href="{% static 'ui/custom.css' %}">
            <link rel="stylesheet" href="{% static 'ui/datepicker.css' %}">
            <link rel="stylesheet" href="{% static 'css/ajax_select.css' %}">
            <link rel="stylesheet" href="{% static 'jquery-ui/jquery-ui.css' %}">
            <link rel="stylesheet" href="{% static 'css/ui.jqgrid.css' %}">
        {% endblock %}
        {% if TRACKING_CODE %}{{ TRACKING_CODE|safe }}{% endif %}
        {% block scripts %}
            <script src="{% static 'jquery-1.7.2.min.js' %}"></script>
            <script src="{% static 'require.js' %}"></script>
            <!-- Use require.js' for mustache! -->
            <script src="{% static 'ui/main.js' %}"></script>
            <script type="text/javascript">
                requirejs.config({
                    baseUrl: '{{ STATIC_URL }}',
                    paths: {
                        'jquery': 'jquery-1.7.2.min',
                        'bootstrap': 'bootstrap/js/bootstrap',
                        'bob-ajax-select': 'js/ajax_select',
                        'jquery-ui': 'jquery-ui/jquery-ui',
                        'djid': 'js/djid',
                        'jqGrid': 'js/jquery.jqGrid.min',
                        'jqGrid-locale': 'js/i18n/grid.locale-en',
                        'ui.multiselect': 'plugins/ui.multiselect',
                        'assets-bulk-edit': 'assets/js/fill-fields',
                        'mobile-app': 'assets/js/mobile',
                    },
                    shim: {
                        'bootstrap': {
                            'deps': ['jquery']
                        },
                        'bootstrap-datepicker': {
                            'deps': ['bootstrap']
                        },
                        'ui.multiselect.js': {
                            'deps': [
                                'jquery',
                                'jquery-ui',
                                'jqGrid-locale'
                            ]
                        },
                        'jqGrid': {
                            'deps': [
                                'jquery',
                                'jquery-ui',
                                'ui.multiselect',
                                'jqGrid-locale'
                            ]
                        },
                        'jqGrid-locale': {
                            'deps': [
                                'jquery',
                                'jquery-ui'
                            ]
                        },
                    }
                });
            </script>
        {% endblock %}
        {% block extra_headers %}{% endblock %}
    </head>
    <body>
        {% include 'ui/menu_extras.html' %}
        <div class="container-fluid browser-min-width">
            <div class="row-fluid">
                <div class="span12 hidden-phone">
                    {% block header %}
                        {% main_menu_bs3fake main_menu active_module position='fixed' white="true" title='Ralph 2' %} {% endblock %}
                    {{ view }}
                </div>
                {% if submodules %}
                    <div>
                        {% tab_menu_bs3fake submodules active_submodule %}
                    </div>
                {% endif %}
                <div class="row-fluid main-body{% if not submodules %} without-submodules{%  else %} with-submodules{% endif %}">
                    {% block base_sidebar %}
                        <div class="{% block sidebar_span %}span2{% endblock %} hidden-phone">
                            {% block sidebar %}
                                {% if sidebar %}
                                    {% sidebar_menu sidebar active_sidebar_item %}
                                {% endif %}
                            {% endblock %}
                        </div>
                    {% endblock %}
                    <div class="{% block content_span %}span10{% endblock %}">
                        {% if messages %}
                            <div class="row-fluid">
                                <div class="span12 alerts">
                                    {% block alerts %}
                                        {% for message in messages %}
                                            <div class="alert alert-{{ message.tags }} fade in">
                                                <a class="close" data-dismiss="alert" href="#">&times;</a>
                                                <p>{{ message.tags|alert_icon }} {{ message }}</p>
                                            </div>
                                        {% endfor %}
                                    {% endblock %}
                                </div>
                            </div>
                        {% endif %}
                        {% block breadcrumbs %}{% endblock %}
                        {% block tabs %}{% endblock %}
                        <div class="row-fluid">
                            {% block contentarea %}
                                {% block content %}{% endblock %}
                            {% endblock %}
                        </div>
                    </div>
                </div>
                <footer class="row-fluid base">
                    <div class="span12">
                        <ul class="pull-left">
                            <li>Ralph {{ VERSION }}</li>
                            <li><a href="{{ CHANGELOG_URL }}">{% trans 'Changes' %}</a></li>
                        </ul>
                        <ul class="pull-right">
                            <li>
                                <a href="{{ BUGTRACKER_URL }}">
                                <i class="fugue-icon fugue-bug"></i>{% trans 'Report a bug' %}</a>
                            </li>
                        </ul>
                    </div>
                </footer>
            </div>
        </div>
        {% block extra_js %}{% endblock %}
    </body>
</html>
<!--STATS-->
